<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>index</title>
	<script type='text/javascript' src='http://localhost/me/ccl_cms/easycms/hdphp/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://localhost/me/ccl_cms/easycms/hdphp/hdphp/Extend/Org/hdjs/hdui/css/hdui.css' rel='stylesheet' media='screen'>
<script src='http://localhost/me/ccl_cms/easycms/hdphp/hdphp/Extend/Org/hdjs/hdui/js/hdui.js'></script>
<link href='http://localhost/me/ccl_cms/easycms/hdphp/hdphp/Extend/Org/hdjs/hdvalidate/css/hdvalidate.css' rel='stylesheet' media='screen'>
<script src='http://localhost/me/ccl_cms/easycms/hdphp/hdphp/Extend/Org/hdjs/hdvalidate/js/hdvalidate.js'></script>
<script src='http://localhost/me/ccl_cms/easycms/hdphp/hdphp/Extend/Org/cal/lhgcalendar.min.js'></script>
<script src='http://localhost/me/ccl_cms/easycms/hdphp/hdphp/Extend/Org/hdjs/hdslide/js/hdslide.js'></script>
<script type='text/javascript'>
HOST = 'http://localhost';
ROOT = 'http://localhost/me/ccl_cms/easycms';
WEB = 'http://localhost/me/ccl_cms/easycms/index.php';
URL = 'http://localhost/me/ccl_cms/easycms/index.php?m=Admin&c=TplStyle&a=index';
APP = 'http://localhost/me/ccl_cms/easycms/CMS';
COMMON = 'http://localhost/me/ccl_cms/easycms/CMS/Common';
HDPHP = 'http://localhost/me/ccl_cms/easycms/hdphp/hdphp';
HDPHPDATA = 'http://localhost/me/ccl_cms/easycms/hdphp/hdphp/Data';
HDPHPEXTEND = 'http://localhost/me/ccl_cms/easycms/hdphp/hdphp/Extend';
MODULE = 'http://localhost/me/ccl_cms/easycms/index.php?m=Admin';
CONTROLLER = 'http://localhost/me/ccl_cms/easycms/index.php?m=Admin&c=TplStyle';
ACTION = 'http://localhost/me/ccl_cms/easycms/index.php?m=Admin&c=TplStyle&a=index';
STATIC = 'http://localhost/me/ccl_cms/easycms/Static';
HDPHPTPL = 'http://localhost/me/ccl_cms/easycms/hdphp/hdphp/Lib/Tpl';
VIEW = 'http://localhost/me/ccl_cms/easycms/CMS/Admin/View';
PUBLIC = 'http://localhost/me/ccl_cms/easycms/CMS/Admin/View/Public';
CONTROLLERVIEW = 'http://localhost/me/ccl_cms/easycms/CMS/Admin/View/TplStyle';
HISTORY = 'http://localhost/me/ccl_cms/easycms/index.php?m=Admin&c=Index&a=index';
</script>
</head>
<body>
	<div class="wrap">
		<div class="title-header">模版列表</div>
		<ul>
			<?php $hd["list"]["d"]["total"]=0;if(isset($dirs) && !empty($dirs)):$_id_d=0;$_index_d=0;$lastd=min(1000,count($dirs));
$hd["list"]["d"]["first"]=true;
$hd["list"]["d"]["last"]=false;
$_total_d=ceil($lastd/1);$hd["list"]["d"]["total"]=$_total_d;
$_data_d = array_slice($dirs,0,$lastd);
if(count($_data_d)==0):echo "";
else:
foreach($_data_d as $key=>$d):
if(($_id_d)%1==0):$_id_d++;else:$_id_d++;continue;endif;
$hd["list"]["d"]["index"]=++$_index_d;
if($_index_d>=$_total_d):$hd["list"]["d"]["last"]=true;endif;?>
					
				<li <?php if($d['current']){?>class='current'<?php }?> dir='<?php echo $d['filename'];?>'>
					<img src="<?php echo $d['image'];?>" <?php echo $d['current'];?>>
					<p><?php echo $d['config']['author'][0];?></p>
					<p><?php echo $d['config']['email'][0];?></p>
				</li>
			<?php $hd["list"]["d"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>			
		</ul>
		<style type="text/css">
			ul li{
				float: left;
				border: 2px solid #eee;
				margin:10px;
				cursor: pointer;
			}
			
			ul li img{
				width:200px;
				height: 200px;
				opacity: 0.3;
			}
			ul li.current img{
				opacity: 1;
			}
		</style>
		<script type="text/javascript">
		$('ul li').click(function(){
			var dirName=$(this).attr('dir');
			$.post(CONTROLLER+'&a=set',{dir:dirName},function(json){
				alert(json.message);
				location.reload(true);
			},'json')
		})
		</script>
	</div>

</body>
</html>